home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Today - The Disc! 5
/
CD-ROM Today - The Disc (Issue 5)(November 1994).ISO
/
mac
/
Mac shareware
/
Education
/
RLaB
/
help
/
reshape
< prev
next >
Wrap
Text File
|
1994-09-21
|
540b
|
19 lines
reshape:
Syntax: reshape ( A , nrow, ncol )
Description:
Reshape does what it's name implies, it reshapes the input
matrix so that the return value has the number of rows and
columns specified by the last two arguments. Reshape will not
reshape the matrix if the product of the new row and column
dimensions does not equal the product of the existing row and
column dimensions.
Examples:
m = [1,2,3;4,5,6;7,8,9];
mrow = reshape(m, 1, 9); // converts m to a row matrix
mcol = reshape(m, 9, 1); // converts m to a column matrix